package hm1;

public class Undergraduate extends student{
    String specialty;
    public Undergraduate(String name, int age, String degree,String specialty) {
        super(name, age, degree);
        this.specialty = specialty;
    }

    @Override
    public void show() {
        super.show();
        System.out.println("专业:"+specialty);
    }
}

